package com.jt;

import com.jt.system.dao.LogMapper;
import com.jt.system.pojo.Log;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Date;

@SpringBootTest
public class LogServiceImpl {
    @Autowired
    private LogMapper logMapper;
    @Test
    public void insertLog(){
        Log log = new Log();
        log.setId(1L).
                setIp("192.168.100.200").
                setMethod("com.jt.resourceController.doSelect").
                setOperation("查询资源").
                setStatus(1).
                setParams("").
                setUsername("cgb2107").
                setTime(100L).
                setError("123").
                setCreatedTime(new Date());
        logMapper.insert(log);
    }
}
